﻿using System.Collections.Generic;
using IceCS.GoodsSale.DAL;
using IceCS.GoodsSale.Models.UserModels;

namespace IceCS.GoodsSale.BLL
{
    public class UserPurviewManager
    {
        UserPurviewAccesser userPurviewDAL = new UserPurviewAccesser();

        //调用DAL层的SelectUserPurview()方法，获取指定用户的权限信息
        public UserPurview GetUserPurview(string userName)
        {
            return userPurviewDAL.SelectUserPurview(userName);
        }

        //调用DAL层的SelectUserPurviews()方法，获取用户权限信息列表
        public List<UserPurview> GetUserPurviews()
        {
            return userPurviewDAL.SelectUserPurviews();
        }

        //调用DAL层的UpdateUserPurview()方法，修改用户权限
        public bool ChangeUserPurview(UserPurview userPurview)
        {
            return userPurviewDAL.UpdateUserPurview(userPurview);
        }
    }
}
